<!--Start Breadcrumb-->
<div class="row">
    <div id="breadcrumb" class="col-xs-12">

    </div>
</div>
<!--End Breadcrumb-->
<!--Start Dashboard 2-->

<div class="row-fluid">


    <div id="dashboard_tabs" class="col-xs-12 col-sm-10">
        <form id="natural" method="post" data-target="flujo/RegistroNatural" action="#solicitud" class="form">
            <!--Start datos Tab 1-->
            <div id="dashboard-overview" class="row" style="visibility: visible; position: relative;">
                <div class="box">
                    <div class="box-content">
                        <div class="text-left">
                            <h4 class="page-header">Registro de Institucion</h4>
                        </div>
                       
                        <div class="row">

                       
                            <div class="col-xs-12 col-sm-12">
                                <div class="box">
                                    <div class="box-header">
                                        <div class="box-name">
                                            <i class="fa fa-table"></i>
                                            <span>Ferias</span>
                                        </div>
                                        <div class="box-icons">
                                            <a class="collapse-link">
                                                <i class="fa fa-chevron-up"></i>
                                            </a>
                                            <a class="expand-link">
                                                <i class="fa fa-expand"></i>
                                            </a>

                                        </div>
                                        <div class="no-move"></div>
                                    </div>
                                    <div class="box-content">

                                        <table class="table">
                                            <thead>
                                                <tr>
                                                    <th>Fecha</th>
                                                    <th>Sector</th>
                                                    <th>Punto</th>
                                                    <th>Tipo de Feria</th>
                                                    <th>Estado</th>
                                                    <th>Municipio</th>
                                                    <th>Parroquia</th>
                                                    <th>Registro</th>

                                                </tr>
                                            </thead>
                                            <tbody id="tb">
                                               
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>


                        </div>
                    </div>
                </div>
            </div>
            <!--End datos Tab 1-->


        </form>
    </div>

    <div class="clearfix"></div>
    
</div>
<div id="myModel" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="alert alert-danger">
                        <i class="fa fa-exclamation-triangle"></i>
                        <strong></strong> 
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
                    </div>
                </div> 
            </div>
        </div>
    </div>
<!--End Dashboard 2 -->

<script type="text/javascript">

// Run Select2 on element
    function tabla() {
     
        $.ajax({
            type: "post",
            url: "../get/tabla",
            dataType: "json",
            data: {tabla: 2,id: <?php echo $_SESSION['info']['clvusuario']; ?>},
            success: function(data) {
                if (data['success']){
                   
                    $('#tb').html('');
                        $.each( data['dato'], function( key, value ) {
                          
                           $('#tb').append('<tr><td>'+value['datefecha']+'</td><td>'+value['strlocalidad']+'</td><td>'+value['strpunto']+'</td><td>'+value['tipoferia']+'</td><td>'+value['estado']+'</td><td>'+value['municipio']+'</td><td>'+value['parroquia']+'</td><td> <button clv="'+value['clvferia']+' " type="button" href="despacho"> <img src="../includes/img/next.jpg"  height="25" width="25"></button>   </td></tr>');
                           
                             });
                         $('button').click( function (e){
        
      
         
            e.preventDefault();
            
            var url = $(this).attr('href');
             var clvferia = $(this).attr('clv');
            window.location.hash = url;
            
           LoadAjaxContent('feria/' + url+'/'+clvferia);
        
    }); 
               
                }else {
                        jError('ERROR : '+data['mensaje'], {
                         VerticalPosition : 'center',
                         HorizontalPosition : 'center'
                     });
                    }
   
            }
        });


    }
    $(document).ready(function() {
        // Load script of Select2 and run this
        
 
        tabla();
        $('.form-control').tooltip();
      
        
        

        // Load script of Select2 and run this
        DashboardTabChecker();
        WinMove();
    });
</script>
